/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package de.up.ling.irtg.codec;

import de.up.ling.irtg.algebra.graph.SGraph;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
 *
 * @author koller
 */
@CodecMetadata(name = "sdp", description = "Graph (Semeval 2014 format)", extension = "sdp", type = SGraph.class)
public class SdpGraphInputCodec extends InputCodec<SGraph> {
    @Override
    public SGraph read(InputStream is) throws ParseException, IOException {
        SdpGraphReader r = new SdpGraphReader(new InputStreamReader(is));
        return r.readGraphAsSdp();
    }    
}
